import Vue from 'vue'
import Router from 'vue-router'
import Layout from "../pages/Layout";
import Home from "../pages/Home";
import Mine from "../pages/Mine";
import Search from "../pages/Search";
import Topic from "../pages/Topic";
import Player from "../pages/Player/index";


Vue.use(Router);

export default new Router({
  linkActiveClass:'active',
  routes: [
    {
      path: '/',
      name: 'Layout',
      component: Layout,
      children:[
        {
          path: '/',
          name: 'Home',
          component: Home
        },
        {
          path: 'mine',
          name: 'Mine',
          component: Mine
        },
        {
          path: 'search',
          name: 'Search',
          component: Search
        },
        {
          path: 'topic',
          name: 'Topic',
          component: Topic
        },
      ]
    },
    {
      path: '/player/:songid',
      name: 'Player',
      component: Player,
      props:true
    },

  ]
})
